package main

import (
	"fmt"
	"time"
)

const (
	defaultDateTimeFormat = "2006-01-02 15:04:05"
	defaultDateFormat     = "2006-01-02"
)

func main() {
	loc, _ := time.LoadLocation("Local")
	value, _ := time.ParseInLocation(defaultDateTimeFormat, "1988-05-07 00:00:00", loc)
	fmt.Println(value)
	timeInt := value.Unix()
	fmt.Println(timeInt)
	a := time.Unix(timeInt, 0)
	fmt.Println(a)
	fmt.Println()
	loc, _ = time.LoadLocation("Local")
	value, _ = time.ParseInLocation(defaultDateFormat, "1988-05-07", loc)
	fmt.Println(value)
	timeInt = value.Unix()
	fmt.Println(timeInt)
	a = time.Unix(timeInt, 0)
	fmt.Println(a)
}
